﻿@model YogaStudio.Data.Domain.Course

@{
    ViewBag.Title = "Edit";
}


<div class="main">
    <div class="content">
        <div class="section group">
            <div class="col span_2_of_3">
                <div class="contact-form">
                    <h3>Course Edit</h3>
                    @using (Html.BeginForm())
                    {
                        @Html.AntiForgeryToken()

                        <div class="form-horizontal">
                          
                            @Html.ValidationSummary(true)
                            @Html.HiddenFor(model => model.Id)

                            <div class="form-group">
                                @Html.LabelFor(model => model.CourseCode, htmlAttributes: new { @class = "control-label col-md-2" })
                                <div class="col-md-10">
                                    @Html.EditorFor(model => model.CourseCode)
                                    @Html.ValidationMessageFor(model => model.CourseCode)
                                </div>
                            </div>

                            <div class="form-group">
                                @Html.LabelFor(model => model.CourseName, htmlAttributes: new { @class = "control-label col-md-2" })
                                <div class="col-md-10">
                                    @Html.EditorFor(model => model.CourseName)
                                    @Html.ValidationMessageFor(model => model.CourseName)
                                </div>
                            </div>

                            <div class="form-group">
                                @Html.LabelFor(model => model.CourseDescription, htmlAttributes: new { @class = "control-label col-md-2" })
                                <div class="col-md-10">
                                    @Html.EditorFor(model => model.CourseDescription)
                                    @Html.ValidationMessageFor(model => model.CourseDescription)
                                </div>
                            </div>

                            <div class="form-group">
                                @Html.LabelFor(model => model.PrerequisiteId, "PrerequisiteId", htmlAttributes: new { @class = "control-label col-md-2" })
                                <div class="col-md-10">
                                    @Html.DropDownList("PrerequisiteId", null, htmlAttributes: new { @class = "form-control" })
                                    @Html.ValidationMessageFor(model => model.PrerequisiteId, "", new { @class = "text-danger" })
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-md-offset-2 col-md-10">
                                    <input type="submit" value="Save" class="btn btn-default" />
                                    @Html.ActionLink("Back to List", "Index", null, new { @class = "btn", @id = "bluebck" })
                                </div>
                            </div>
                        </div>
                    }
                </div>
            </div>
        </div>
    </div>
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}